<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License. 
-->
<html>
<head>
    <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
    <style type="text/css">
        .dp-highlighter {
            width:95% !important;
        }
    </style>
    <style type="text/css">
        .footer {
            background-image:      url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
            background-repeat:     repeat-x;
            background-position:   left top;
            padding-top:           4px;
            color:                 #666;
        }
    </style>
    <link href='https://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
    <script src='https://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' type='text/javascript'></script>
    <script type="text/javascript">
        SyntaxHighlighter.defaults['toolbar'] = false;
        SyntaxHighlighter.all();
    </script>
    <script type="text/javascript" language="javascript">
        var hide = null;
        var show = null;
        var children = null;

        function init() {
            /* Search form initialization */
            var form = document.forms['search'];
            if (form != null) {
                form.elements['domains'].value = location.hostname;
                form.elements['sitesearch'].value = location.hostname;
            }

            /* Children initialization */
            hide = document.getElementById('hide');
            show = document.getElementById('show');
            children = document.all != null ?
                    document.all['children'] :
                    document.getElementById('children');
            if (children != null) {
                children.style.display = 'none';
                show.style.display = 'inline';
                hide.style.display = 'none';
            }
        }

        function showChildren() {
            children.style.display = 'block';
            show.style.display = 'none';
            hide.style.display = 'inline';
        }

        function hideChildren() {
            children.style.display = 'none';
            show.style.display = 'inline';
            hide.style.display = 'none';
        }
    </script>
    <title>xhtml theme</title>
</head>
<body onload="init()">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
    <tr class="topBar">
        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a href="guides.html">Guides</a>&nbsp;&gt;&nbsp;<a href="tag-developers-guide.html">Tag Developers Guide</a>&nbsp;&gt;&nbsp;<a href="struts-tags.html">Struts Tags</a>&nbsp;&gt;&nbsp;<a href="ui-tags.html">UI Tags</a>&nbsp;&gt;&nbsp;<a href="themes-and-templates.html">Themes and Templates</a>&nbsp;&gt;&nbsp;<a href="xhtml-theme.html">xhtml theme</a>
        </td>
        <td align="right" valign="middle" nowrap>
            <form name="search" action="https://www.google.com/search" method="get">
                <input type="hidden" name="ie" value="UTF-8" />
                <input type="hidden" name="oe" value="UTF-8" />
                <input type="hidden" name="domains" value="" />
                <input type="hidden" name="sitesearch" value="" />
                <input type="text" name="q" maxlength="255" value="" />
                <input type="submit" name="btnG" value="Google Search" />
            </form>
        </td>
    </tr>
</table>

<div id="PageContent">
    <div class="pageheader" style="padding: 6px 0px 0px 0px;">
        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
        <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
        <div style="margin: 0px 10px 8px 10px"  class="pagetitle">xhtml theme</div>

        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=13834">
                <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=13834">Edit Page</a>
            &nbsp;
            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
                <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
            &nbsp;
            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=13834">
                <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=13834">Add Page</a>
            &nbsp;
            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=13834">
                <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=13834">Add News</a>
        </div>
    </div>

    <div class="pagecontent">
        <div class="wiki-content">
            <div id="ConfluenceContent">
<p>The xhtml provides all the basics that the <a shape="rect" href="simple-theme.html">simple theme</a> provides and adds several features.</p>
<ul><li>Standard two-column table layout for the HTML <a shape="rect" href="struts-tags.html">Struts Tags</a> (<a shape="rect" href="form.html">form</a>, <a shape="rect" href="textfield.html">textfield</a>, <a shape="rect" href="select.html">select</a>, and so forth)</li><li>Labels for each of the HTML <a shape="rect" href="struts-tags.html">Struts Tags</a> on the left hand side (or top, depending on the <code>labelposition</code> attribute)</li><li><a shape="rect" href="validation.html">Validation</a> and error reporting</li><li><a shape="rect" href="pure-javascript-client-side-validation.html">Pure JavaScript Client Side Validation</a> using 100% JavaScript on the browser</li></ul>


<h2 id="xhtmltheme-WrappingtheSimpleTheme">Wrapping the Simple Theme</h2>

<p>The xhtml theme uses the "wrapping" technique described by <a shape="rect" href="extending-themes.html">Extending Themes</a>. Let's look at how the HTML tags are wrapped by a standard header and footer. For example, in the <code>text.ftl</code> template, the <code>controlheader.ftl</code> and <code>controlfooter.ftl</code> templates are wrapped around the simple template.</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
&lt;#--
/*
 * $Id$
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * &quot;License&quot;); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
--&gt;
&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl&quot; /&gt;
&lt;#include &quot;/${parameters.templateDir}/simple/text.ftl&quot; /&gt;
&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl&quot; /&gt;
]]></script>
</div></div>
<p><img class="emoticon emoticon-question" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/help_16.png" data-emoticon-name="question" alt="(question)"> The <code>controlheader.ftl</code> is referenced using ${parameters.theme} so that the code can be reused by the <a shape="rect" href="ajax-theme.html">ajax theme</a>.</p>

<h2 id="xhtmltheme-XHTMLThemeHeader">XHTML Theme Header</h2>

<p>Now let's look at the <code>controlheader.ftl</code> and <code>controlheader-core.ftl</code>. Again, these are split up for easy re-use with the <a shape="rect" href="ajax-theme.html">ajax theme</a>) contents:</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
&lt;#--
/*
 * $Id$
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * &quot;License&quot;); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
--&gt;
&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl&quot; /&gt;
    &lt;td
&gt;&lt;#t/&gt;
]]></script>
</div></div>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
&lt;#--
/*
 * $Id$
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * &quot;License&quot;); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
--&gt;
&lt;#--
	Only show message if errors are available.
	This will be done if ActionSupport is used.
--&gt;
&lt;#assign hasFieldErrors = parameters.name?? &amp;&amp; fieldErrors?? &amp;&amp; fieldErrors[parameters.name]??/&gt;
&lt;#if parameters.errorposition?default(&quot;top&quot;) == &#39;top&#39;&gt;
&lt;#if hasFieldErrors&gt;
&lt;#list fieldErrors[parameters.name] as error&gt;
&lt;tr errorFor=&quot;${parameters.id}&quot;&gt;
    &lt;td class=&quot;tdErrorMessage&quot; colspan=&quot;2&quot;&gt;&lt;#rt/&gt;
        &lt;span class=&quot;errorMessage&quot;&gt;${error?html}&lt;/span&gt;&lt;#t/&gt;
    &lt;/td&gt;&lt;#lt/&gt;
&lt;/tr&gt;
&lt;/#list&gt;
&lt;/#if&gt;
&lt;/#if&gt;
&lt;#if !parameters.labelposition?? &amp;&amp; (parameters.form.labelposition)??&gt;
&lt;#assign labelpos = parameters.form.labelposition/&gt;
&lt;#elseif parameters.labelposition??&gt;
&lt;#assign labelpos = parameters.labelposition/&gt;
&lt;/#if&gt;
&lt;#--
	if the label position is top,
	then give the label it&#39;s own row in the table
--&gt;
&lt;tr&gt;
&lt;#if labelpos?default(&quot;&quot;) == &#39;top&#39;&gt;
    &lt;td class=&quot;tdLabelTop&quot; colspan=&quot;2&quot;&gt;&lt;#rt/&gt;
&lt;#else&gt;
    &lt;td class=&quot;tdLabel&quot;&gt;&lt;#rt/&gt;
&lt;/#if&gt;
&lt;#if parameters.label??&gt;
    &lt;label &lt;#t/&gt;
&lt;#if parameters.id??&gt;
        for=&quot;${parameters.id?html}&quot; &lt;#t/&gt;
&lt;/#if&gt;
&lt;#if hasFieldErrors&gt;
        class=&quot;errorLabel&quot;&lt;#t/&gt;
&lt;#else&gt;
        class=&quot;label&quot;&lt;#t/&gt;
&lt;/#if&gt;
    &gt;&lt;#t/&gt;
&lt;#if parameters.required?default(false) &amp;&amp; parameters.requiredPosition?default(&quot;right&quot;) != &#39;right&#39;&gt;
        &lt;span class=&quot;required&quot;&gt;*&lt;/span&gt;&lt;#t/&gt;
&lt;/#if&gt;
${parameters.label?html}&lt;#t/&gt;
&lt;#if parameters.required?default(false) &amp;&amp; parameters.requiredPosition?default(&quot;right&quot;) == &#39;right&#39;&gt;
 &lt;span class=&quot;required&quot;&gt;*&lt;/span&gt;&lt;#t/&gt;
&lt;/#if&gt;
${parameters.labelseparator?default(&quot;:&quot;)?html}&lt;#t/&gt;
&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/tooltip.ftl&quot; /&gt;
&lt;/label&gt;&lt;#t/&gt;
&lt;/#if&gt;
    &lt;/td&gt;&lt;#lt/&gt;
&lt;#-- add the extra row --&gt;
&lt;#if labelpos?default(&quot;&quot;) == &#39;top&#39;&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;/#if&gt;
]]></script>
</div></div>
<p>The header used by the HTML tags in the xhtml theme is complicated. However, a close look reveals that the logic produces two behaviors: either a two-column format or a two-row format. Generally the two-column approach is what we want, so that is the default option. To use the two-row approach, change the <code>labelposition</code> parameter to <code>top</code>.</p>
<div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Moving fieldErrors</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
<p>The <code>fieldErrors</code>, usually caused by <a shape="rect" href="validation.html">Validation</a>, are printed out as a row above the HTML form element. Some people prefer that the errors display elsewhere, such as in a third column. If you wish to place these elsehwere, overriding the headers is easy, allowing you to continue to use the other features provided by this theme. See <a shape="rect" href="template-loading.html">Template Loading</a> for more information on how to do this.</p></div></div>

<h2 id="xhtmltheme-XHTMLThemeFooter">XHTML Theme Footer</h2>

<p>The primary objective of <code>controlfooter.ftl</code> is to close the table. But, before the table closes, the template checks for an <code>after</code> parameter.</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
&lt;#--
/*
 * $Id$
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * &quot;License&quot;); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
--&gt;
${parameters.after?if_exists}&lt;#t/&gt;
    &lt;/td&gt;&lt;#lt/&gt;
&lt;/tr&gt;
&lt;#if parameters.errorposition?default(&quot;top&quot;) == &#39;bottom&#39;&gt;
&lt;#assign hasFieldErrors = parameters.name?? &amp;&amp; fieldErrors?? &amp;&amp; fieldErrors[parameters.name]??/&gt;
&lt;#if hasFieldErrors&gt;
&lt;#list fieldErrors[parameters.name] as error&gt;
&lt;tr errorFor=&quot;${parameters.id}&quot;&gt;
    &lt;td class=&quot;tdErrorMessage&quot; colspan=&quot;2&quot;&gt;&lt;#rt/&gt;
        &lt;span class=&quot;errorMessage&quot;&gt;${error?html}&lt;/span&gt;&lt;#t/&gt;
    &lt;/td&gt;&lt;#lt/&gt;
&lt;/tr&gt;
&lt;/#list&gt;
&lt;/#if&gt;
&lt;/#if&gt;

]]></script>
</div></div>
<p>While "after" isn't an attribute supported by any of the <a shape="rect" href="struts-tags.html">Struts Tags</a>, if you are using <a shape="rect" href="freemarker-tags.html">FreeMarker Tags</a>, <a shape="rect" href="velocity-tags.html">Velocity Tags</a>, or the <a shape="rect" href="param.html">param</a> tag in any template language, you can add an <code>after</code> parameter to place any content you like after the <a shape="rect" href="simple-theme.html">simple theme</a> template renders. The <code>after</code> attribute makes it easier to fine-tune HTML forms for your specific environment.</p>

<h2 id="xhtmltheme-SpecialInterest">Special Interest</h2>

<p>Two xhtml templates of special interest are <code>head</code> and <code>form</code>.</p>

<h3 id="xhtmltheme-headtemplate">head template</h3>

<p>The xhtml <a shape="rect" href="head.html">head</a> template extends the <a shape="rect" href="simple-head-template.html">simple head template</a> and provides an additional CSS that helps render the <a shape="rect" href="xhtml-theme.html">xhtml theme</a> form elements.</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
&lt;#--
/*
 * $Id$
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * &quot;License&quot;); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
--&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;@s.url value=&#39;/struts/xhtml/styles.css&#39; includeParams=&#39;none&#39; encode=&#39;false&#39; /&gt;&quot; type=&quot;text/css&quot;/&gt;
&lt;#include &quot;/${parameters.templateDir}/simple/head.ftl&quot; /&gt;
]]></script>
</div></div>
<p>The head template imports a style sheet.</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
/*
 * $Id$
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * &quot;License&quot;); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

.wwFormTable {}
.label {font-style:italic; }
.errorLabel {font-style:italic; color:red; }
.errorMessage {font-weight:bold; color:red; }
.checkboxLabel {}
.checkboxErrorLabel {color:red; }
.required {color:red;}
.tdLabel {text-align:right; vertical-align:top; }

.tdTransferSelect {text-align:center; vertical-align:middle;}
.tdLabelTop {text-align:left; vertical-align:top;}
.tdCheckboxLabel {text-align:right; vertical-align:top;}
.tdCheckboxInput {text-align:left; vertical-align:top;}
.tdCheckboxErrorMessage {text-align:left; vertical-align:top;}
.tdErrorMessage {text-align:center; vertical-align:top;}
.formButton {text-align:right;}
]]></script>
</div></div>

<h3 id="xhtmltheme-formtemplate">form template</h3>

<p>The xhtml form template sets up the wrapping table around all the other <a shape="rect" href="xhtml-theme.html">xhtml theme</a> form elements. In addition to creating this wrapping table, the opening and closing templates also, if the <code>validate</code> parameter is set to true, enable <a shape="rect" href="pure-javascript-client-side-validation.html">Pure JavaScript Client Side Validation</a>.</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
&lt;#--
/*
 * $Id$
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * &quot;License&quot;); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
--&gt;
&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/form-validate.ftl&quot; /&gt;
&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/form-common.ftl&quot; /&gt;
&lt;#if (parameters.validate?default(false))&gt;
  onreset=&quot;${parameters.onreset?default(&#39;clearErrorMessages(this);clearErrorLabels(this);&#39;)}&quot;
&lt;#else&gt;
  &lt;#if parameters.onreset??&gt;
  onreset=&quot;${parameters.onreset?html}&quot;
  &lt;/#if&gt;
&lt;/#if&gt;
&gt;
&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/control.ftl&quot; /&gt;
]]></script>
</div></div>
<p>The closing template, <code>form-close.ftl*</code>:</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
&lt;#--
/*
 * $Id$
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * &quot;License&quot;); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
--&gt;
&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/control-close.ftl&quot; /&gt;
&lt;#include &quot;/${parameters.templateDir}/simple/form-close.ftl&quot; /&gt;
&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/form-close-validate.ftl&quot; /&gt;
&lt;#if parameters.focusElement?if_exists != &quot;&quot;&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    StrutsUtils.addOnLoad(function() {
        var element = document.getElementById(&quot;${parameters.focusElement?html}&quot;);
        if(element) {
            element.focus();
        }
    });
&lt;/script&gt;
&lt;/#if&gt;
]]></script>
</div></div></div>
        </div>

                    <div class="tabletitle">
                Children
            <span class="smalltext" id="show" style="display: inline;">
              <a href="javascript:showChildren()">Show Children</a></span>
            <span class="smalltext" id="hide" style="display: none;">
              <a href="javascript:hideChildren()">Hide Children</a></span>
            </div>
            <div class="greybox" id="children" style="display: none;">
                                                    $page.link($child)
                    <span class="smalltext">(Apache Struts 2 Documentation)</span>
                    <br>
                                    $page.link($child)
                    <span class="smalltext">(Apache Struts 2 Documentation)</span>
                    <br>
                            </div>
        
    </div>
</div>
<div class="footer">
    Generated by CXF SiteExporter
</div>
</body>
</html>
